<?php
namespace App\Http\Controllers\ApiWx;

use App\DBs\VideoDB;
use Illuminate\Http\Request;

class FarmController extends BaseController
{
    //农场

    protected $db;

    public function __construct()
    {
        parent::__construct();
        $this->db = new VideoDB();
    }

    //领取
    public function getOwnerIndex(Request $request)
    {
        $uid = $request->post('uid',0);
        $res = $this->db->getOwnerIndex($uid);
        if ($res['code']!=0) {
            return $this->toWxJson(-3);
        }
        return $this->toWxJson(0,$res['data']);
    }
}